home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 076-100 / disk_096 / warptext / warptext.doc < prev    next >
Text File  |  1992-05-06  |  7KB  |  154 lines

  1. WarpText.doc                      WT 2.0                        Bill Kelly
  2.                                                                 07/06/87
  3.  
  4.        //     // ////// //////  //////    //////// ////// ||//  ////////
  5.       //     // //  // //  //  //  //       //    //      |//     //
  6.      //  /  // ////// //////  //////       //    /////    //     //
  7.     // /// // //  // //  //  //           //    //       //|    //
  8.    ///   /// //  // //   // //           //    //////   //||   //
  9.  
  10. THANK YOU'S: (in alphabetical order)
  11.  
  12.   Thanks to Anson Mah for writing the WarpText 'C' interface.
  13.   Without him, there wouldn't be one -- I don't speak C!
  14.  
  15.   Thanks to Aaron Avery for taking my original unreleased WarpText routine,
  16.   which was fast but not fancy, and speeding it up immensely.  This routine,
  17.   (after I sped it up even more by rearranging the font data), and Aaron's
  18.   cursor routine, are WarpText 2.0.
  19.  
  20.   Thanks to Hayes C. Haugen who, by writing Blitz, reminded me of what
  21.   text on a computer like this *ought* to be like and so got me started
  22.   on WarpText.
  23.  
  24.   Thanks to Leon Frankel (sorry if I got the name wrong -- that's what it
  25.   sounded like over the phone) for reporting a bug in the wi_Width handling
  26.   in the WarpText prerelease routines.
  27.   (Please see "BUGS:" for more information.)
  28.  
  29.   If I forgot anyone -- sorry.  Thanks to you, too!
  30.  
  31. COPYRIGHT NOTICE:
  32.  
  33.                 The WarpText code, and the name "WarpText,"
  34.                     is Copyright 1987 by Bill W. Kelly.
  35.  
  36. DISTRIBUTION INFORMATION:
  37.  
  38.   Feel free to distribute this code, complying with the following
  39.   restriction:
  40.  
  41.        Since there are many files in this release of WarpText,
  42.        please distribute them in ARCed form so that no files get lost.
  43.        (If you need to UUEncode, please UUEncode the ARC file.)
  44.        Thanks!
  45.  
  46.   NOTE: IF YOU ARE GOING TO MODIFY THE CODE, please make a little note
  47.         containing the date, your comments, and what the original code was.
  48.         Thanks.
  49.  
  50. USING WARPTEXT IN A PROGRAM:
  51.  
  52.   That's why I wrote it!
  53.  
  54.   If you are going to distribute the WarpText source code with your program
  55.   please also follow the directions under "DISTRIBUTION INFORMATION."
  56.  
  57.   It would be neat, especially if you aren't distributing the source
  58.   with your program, if you could find a place somewhere in your program
  59.   (the "ABOUT" menu, for instance) to say something like,
  60.   "Using Bill Kelly's WarpText routines for speed!," however if you
  61.   don't seem to be able to do this... don't worry about it.  I would
  62.   really appreciate it, though!  Thanks!
  63.  
  64.   PLEASE CONTACT ME BEFORE USING THIS CODE IN A COMMERCIAL PROGRAM!
  65.            (My address can be found at the end of this file.)
  66.  
  67. GENERAL INFORMATION:
  68.  
  69.   The "Old Warp" routines use the WarpInfo structure to keep track
  70.   of which bitplane they're writing into, the current X and Y locations,
  71.   the TextFont data, etc.
  72.  
  73.   STRUCTURE   WarpInfo,0      ; ...the <I> denotes internal use.
  74.       APTR    wi_TextFont     ;     Pointer to a TextFont structure.
  75.       APTR    wi_BitMap       ;     Pointer to a BitMap structure.
  76.       WORD    wi_WhichPlane   ;     Which bitplane to render into.
  77.       WORD    wi_Left         ;     Left edge of 'window' in char loc's.
  78.       WORD    wi_Top          ;     Top edge of 'window' in char loc's.
  79.       WORD    wi_Width        ;     Width of 'window' in char loc's.
  80.       WORD    wi_Height       ;     Height of 'window' in char loc's.
  81.       APTR    wi_WindowTop    ; <I> Address of top of 'window.'
  82.       APTR    wi_CurLine      ; <I> Address of start of current line.
  83.       APTR    wi_LastLine     ; <I> Address of start of last line.
  84.       WORD    wi_CurX         ; <I> Current X position.
  85.       WORD    wi_LastX        ; <I> Maximum X position on a line.
  86.       WORD    wi_BPMod        ; <I> # total possible chars on a line in bp
  87.       WORD    wi_Modulo       ; <I> Add this to get to next line.
  88.       LABEL   wi_SIZE
  89.  
  90.   Call the InitWarpInfo routine before calling any of the other "Old Warp"
  91.   routines.  The WarpInfo structure you pass InitWarpInfo must be partially
  92.   initialized before calling InitWarpInfo.  InitWarpInfo prepares
  93.   the parts WarpInfo structure marked with "<I>" so that the WarpInfo
  94.   structure can be used with GetXY, GotoXY, and WarpText.
  95.  
  96.   The "New Warp" routines use NewWarpInfo structure.  It's a lot smaller
  97.   than WarpInfo because the new routines have sacrificed features for speed.
  98.  
  99.     STRUCTURE   NewWarpInfo,0
  100.         WORD    nwi_XLoc        ; Current X position in char. loc's.
  101.         WORD    nwi_YLoc        ; Current Y position in char. loc's.
  102.         APTR    nwi_BitPlane    ; Address of bitplane to render text into.
  103.         APTR    nwi_FontData    ; Address of 2048 byte array for font data.
  104.         LABEL   nwi_SIZE
  105.  
  106.   Call the SetupFont routine before calling any of the other "New Warp"
  107.   routines.  SetupFont unpacks the font passed to it into the 2048 byte
  108.   array, the address of which is kept in nwi_FontData.  You must allocate
  109.   this 2048 byte array and store its address into nwi_FontData before
  110.   calling SetupFont.  Pass the pointer to an open font to SetupFont on
  111.   the stack.  The 2048 byte array does not have to be in CHIP ram because
  112.   the routines do not use the blitter.  After calling SetupFont, the
  113.   NewWarpInfo structure can be used with NewWarp and XORCursor.
  114.  
  115.   Please see the file "WarpText.asm" for more information about each
  116.   routine.
  117.  
  118. BUGS:
  119.  
  120.     Known Bugs:                                         Fixed:
  121.     -----------                                         ------
  122.  
  123.       WarpText writes to two more columns per line         /
  124.       than it should.  If you specify 10 for wi_Width    \/        Yes.
  125.       you will get 12 characters per line.
  126.                                                                _
  127.       If WarpText encounters a character that has not    |\ | / \
  128.       been defined in the font it's using it will not    | \| \_/  Not yet.
  129.       output the empty-box character.  A garbage
  130.       character-pattern will appear.
  131.  
  132. BUG REPORTS:
  133.  
  134.   I would really appreciate hearing about any problems you find in
  135.   my code!  Please don't hesitate to drop me a line or send me mail
  136.   if you have any suggestions, questions, or comments.  I welcome
  137.   your input.
  138.                                                     Enjoy,
  139.                                                     Bill Kelly.
  140.  
  141. MY ADDRESS:
  142.  
  143.   NAME: Bill W. Kelly
  144.   UUCP: {hplabs!hp-sdd, sdcsvax, ihnp4}!crash!pnet01!billk
  145.   ARPA: crash!pnet01!billk@nosc
  146.   INET: billk@pnet01.CTS.COM    | For UUCP, don't do just pnet01!billk;
  147.   USPS: 2507 Caminito La Paz    | please include the crash!pnet01!billk.
  148.         La Jolla, CA  92037     | Thanks!
  149.   FONE: (619) 454-1307
  150.  
  151. * --------------------- *
  152. * End of "WarpText.doc" *
  153. * --------------------- *
  154.